# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-io-socket-socks-wrapper
_pkgname=IO-Socket-Socks-Wrapper
pkgver=0.17
pkgrel=9
pkgdesc='Add SOCKS support for any perl object / package / program.'
url='http://search.cpan.org/~oleg/IO-Socket-Socks-Wrapper-0.15/lib/IO/Socket/Socks/Wrapper.pm'
depends=('perl' 'perl-io-socket-socks')
arch=('any')
license=('GPL')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/O/OL/OLEG/$_pkgname-$pkgver.tar.gz")
sha512sums=('badf2b36e7f4dfc5cdd20f01cc0b43d21a1d4e05d30e1832dda0de8ba65ab528a1b6b7a6910a915c1b2244021ed47f9b8b0d700b553ec7475dfa77115cf852e8')

build() {
  cd  "$_pkgname-$pkgver"

  perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd  "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  find "$pkgdir" -type f -name 'perllocal.pod' -delete;
  find "$pkgdir" -type f -name '.packlist' -delete;
}

